const { MongoClient,ObjectId } = require('mongodb');

// const uri = "mongodb://localhost:27017";
const uri = "mongodb://192.168.39.35:27017";


const client = new MongoClient(uri);
// 创建数据库连接
const database = client.db('blog');
// const database = client.db('PetBack');

// 连接数据表
const users = database.collection('users');
const articles = database.collection('articles');
const pets = database.collection('pets');
const news = database.collection('news');
const petsAdoption = database.collection('petsAdoption');
const order = database.collection('order');
const shop = database.collection('shop');
const examine = database.collection('examine');
const like = database.collection('like');
const gouwu = database.collection('gouwu');
const chats = database.collection('chats');


exports.chats = chats;
exports.client = client;
exports.users = users;
exports.articles = articles;
exports.news = news;
exports.pets = pets;
exports.petsAdoption = petsAdoption;
exports.ObjectId = ObjectId;
exports.order = order;
exports.shop = shop;
exports.examine = examine;
exports.like = like;
exports.gouwu = gouwu;

